import urllib
import wsgiref.handlers

from google.appengine.ext import webapp

class showerror(webapp.RequestHandler):
    def get(self):
        #self.response.out.write(self.request.url)
        #return
        errorstr = self.request.path_qs[len('/error/'):]
        errorstr = urllib.unquote_plus(urllib.unquote_plus(errorstr))
        self.response.out.write(errorstr)
        return
    
def main():
    application = webapp.WSGIApplication(
                           [('/error/.*', showerror)],
                           debug=True)
    wsgiref.handlers.CGIHandler().run(application)

if __name__ == '__main__':
    main()

